/*
Copyright 2020 Lucas Heitzmann Gabrielli.
This file is part of gdstk, distributed under the terms of the
Boost Software License - Version 1.0.  See the accompanying
LICENSE file or <http://www.boost.org/LICENSE_1_0.txt>
*/

#ifndef QLIB_HEADER_ALLOCATOR
#define QLIB_HEADER_ALLOCATOR

#define __STDC_FORMAT_MACROS 1

#include <inttypes.h>
#include <stdlib.h>

namespace qlib {

inline void* allocate(uint64_t size) {
  return malloc(size);
};

inline void* reallocate(void* ptr, uint64_t size) {
  return realloc(ptr, size);
};

inline void* allocate_clear(uint64_t size) {
  return calloc(1, size);
};

inline void free_allocation(void* ptr) {
  free(ptr);
};

}  // namespace qlib

#endif
